using System.Data.Linq;
using WebExam.Core.Repository;

namespace WebExam.SQLDataProvider
{
    public class BaseRepository<T> where T : Entity
    {
        public RepositoryContext ThisDb
        {
            get
            {
                return new RepositoryContext();
            }
        }

        public Table<T> ThisTable
        {
            get
            {
                return ThisDb.GetTable<T>();
            }
        }

        public void Dispose()
        {
            ThisDb.Dispose();
        }
    }
}